﻿using System;
using SharpSqlAnalyzer.nodes;

namespace SharpSqlAnalyzer.stmt.mssql
{
	// Token: 0x02000162 RID: 354
	public class TMssqlBlock : TBlockSqlStatement
	{
		// Token: 0x06000C17 RID: 3095 RVA: 0x00306EB4 File Offset: 0x003050B4
		public TMssqlBlock(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstmssqlblock;
		}

		// Token: 0x06000C18 RID: 3096 RVA: 0x00306EC5 File Offset: 0x003050C5
		internal override void buildsql()
		{
		}

		// Token: 0x06000C19 RID: 3097 RVA: 0x00306EC7 File Offset: 0x003050C7
		internal override void clear()
		{
		}

		// Token: 0x06000C1A RID: 3098 RVA: 0x00306EC9 File Offset: 0x003050C9
		internal override string getasprettytext()
		{
			return "";
		}

		// Token: 0x06000C1B RID: 3099 RVA: 0x00306ED0 File Offset: 0x003050D0
		internal virtual void iterate(TVisitorAbs pvisitor)
		{
		}

		// Token: 0x06000C1C RID: 3100 RVA: 0x00306ED4 File Offset: 0x003050D4
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			TBlockSqlNode tblockSqlNode = (TBlockSqlNode)this.rootNode;
			base.doParseStatement(psql);
			if (tblockSqlNode.Stmts != null)
			{
				tblockSqlNode.Stmts.doParse(this, ESqlClause.unknown);
				for (int i = 0; i < tblockSqlNode.Stmts.size(); i++)
				{
					this.BodyStatements.add(tblockSqlNode.Stmts.getStatementSqlNode(i).Stmt);
				}
			}
			return 0;
		}

		// Token: 0x06000C1D RID: 3101 RVA: 0x00306F47 File Offset: 0x00305147
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000C1E RID: 3102 RVA: 0x00306F57 File Offset: 0x00305157
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			if (this.BodyStatements.size() > 0)
			{
				this.BodyStatements.acceptChildren(v);
			}
			v.postVisit(this);
		}
	}
}
